import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { RechargeOption } from 'src/entities/RechargeOption';
import { Repository } from 'typeorm';

@Injectable()
export class RechargeService {
    constructor(
        @InjectRepository(RechargeOption) protected optionRepository:Repository<RechargeOption>
    ){}

    option(id) {
        return this.optionRepository.findOne({id})
    }

    options() {
        return this.optionRepository.find()
    }
}
